package com.tanhua.dubbo.api;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tanhua.dubbo.mappers.AnnouncementMapper;
import com.tanhua.model.domain.Announcement;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

@DubboService
public class AnnouncementApiImpl implements AnnouncementApi{

    @Autowired
    private AnnouncementMapper announcementMapper;

    //分页查询公告
    @Override
    public Page<Announcement> query(Integer page, Integer pagesize) {
        Page<Announcement> page1 = new Page<>(page,pagesize);
        announcementMapper.selectPage(page1,null);
        return page1;
    }
}
